package com.qs.eggs.integral.adapter;

import android.content.Context;
import android.view.View;

import com.facebook.drawee.view.SimpleDraweeView;
import com.qs.eggs.Constants;
import com.qs.eggs.R;
import com.qs.eggs.adapter.BaseViewHolder;
import com.qs.eggs.adapter.SimpleAdapter;
import com.qs.eggs.bean.Fenlei_items;
import com.qs.eggs.integral.IntegralBean;

import java.util.List;

public class IntegralAdapter extends SimpleAdapter<IntegralBean> {



    public IntegralAdapter(Context context, List<IntegralBean> datas) {
        super(context, R.layout.item_integral, datas);
    }

    @Override
    protected void convert(BaseViewHolder viewHoder, IntegralBean item,final int posion) {
           viewHoder.getTextView(R.id.tv_type).setText(item.getProname());
          viewHoder.getTextView(R.id.tv_integral).setText(item.getDuihuanscore());
         SimpleDraweeView draweeView = (SimpleDraweeView) viewHoder.getView(R.id.propic);
         draweeView.setImageURI(Constants.URL_BASE+"productimages/"+item.getAutoname());
    }
}
